package es.uniovi.miw.tfm.scowt.model;

import java.util.LinkedList;
import java.util.List;

public class ProfessionalRole {
    
    private String name;
    
    private List<Competence> competencies;
    
    private ProfessionalRole parentRole;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Competence> getCompetencies() {
	if(competencies == null){
	    competencies = new LinkedList<Competence>();
	}
        return competencies;
    }

    public void setCompetencies(List<Competence> competencies) {
        this.competencies = competencies;
    }

    public ProfessionalRole getParentRole() {
        return parentRole;
    }

    public void setParentRole(ProfessionalRole parentRole) {
        this.parentRole = parentRole;
    }
    
    public void addCompetence(Competence competence){
	if(competencies == null){
	    competencies = new LinkedList<Competence>();
	}
	this.competencies.add(competence);
    }

}
